
<template>
  <div class="headerBar">
    <div class="left">
      <img src="@/assets/img/logo.png" alt="">
    </div>
    <div class="center">
      <div class="btns">
        <i class="iconfont  icon-arrow-left-bold back " @click="goBack"></i>
        <i class="iconfont icon-arrow-right-bold forward" @click="goForWard"></i>
      </div>
      <search></search>
    </div>
    <div class="rig">
      <user-info />
    </div>
  </div>
</template>

<script>
import Search from './Search.vue'
import UserInfo from './UserInfo.vue'
import { useRouter } from 'vue-router'
export default {
  name: 'HeaderBar',
  components: { Search, UserInfo },
  props: {},
  setup() {
    const router = useRouter()
    const goBack = () => {
      router.go(-1)
    }
    const goForWard = () => {
      router.go(1)
    }
    return {
      goBack,
      goForWard
    }
  }
}
</script>

<style scoped>
.headerBar {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 30000;
}

.left {
  width: 110px;
  margin: 0 50px 0 10px;
}
.left img {
  width: 100%;
}
.center {
  display: flex;
  align-content: center;
}
.btns {
  color: #fff;
  height: 22px;
}
.btns i {
  margin: 0 3px;
  padding: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  background-color: var(--red);
}
.right {
  display: flex;
  position: absolute;
  right: 50px;
  top: 0;
  height: 50px;
  line-height: 50px;
}
</style>